home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1993 December
/
PSL Monthly Shareware CD-ROM (December 1993).iso
/
prgmming
/
dos
/
pascal
/
mathlib.exe
/
MATHLIB.DOC
< prev
next >
Wrap
Text File
|
1991-11-30
|
18KB
|
345 lines
Math Libraries (MATHLIB) for Turbo Pascal
Copyright (c) 1991, Waldman Sidelines
Harness the Power of the Advanced Coprocessors in Your Programs!
Waldman Sidelines
Cye H. Waldman
Post Office Box 231157
Encinitas, CA 92023-1157
Tel: (619) 942-3016 : CSERVE 72245,1337
INTRODUCTION
MATHLIB offers Turbo Pascal users enhanced math function libraries specifically
written to tap the power of the 80287 and 80387 coprocessors. All of the
intrinsic trigonometric and exponential functions plus nine additional ones
have been hand-coded in assembly language specifically for each coprocessor.
These nine additional functions were also coded in Pascal for use with any or
no coprocessor. MATHLIB provides a consistent set of Turbo Pascal units for
use with any type of PC with improved performance for advanced coprocessors.
MATHLIB should be of particular interest to those performing numerically
intensive computations such as scientific and engineering calculations and
graphics applications which require coordinate transformations using
trigonometric relations.
This program is a shareware product. You may distribute the original shareware
disk (not including the source code) to your friends for evaluation. If you
use this program you are expected to register it with Waldman Sidelines.
Your registration fee entitles you to use this software on a single computer
and to make as many copies of this software as you wish for your own backup
purposes. Site licenses are available; call for details. You may not use
MATHLIB in a commercial product; a separate licence agreement must be
established with Waldman Sidelines.
Upon receipt of your registration you will receive a disk with the Pascal
source and the assembled object code required to compile the units, as well
as some bonus software (keep reading). (Contact the author regarding
availability of the assembly language source code.) In addition, you will
receive notifications of future software updates.
LIMIT OF LIABILITY
MATHLIB is distributed as-is. The author disclaims all warranties expressed or
implied. The author will assume no liability for damages either from direct
use of this product or as a consequence of the use of this product.
COPYRIGHT
MATHLIB is copyrighted with all rights reserved to Waldman Sidelines.
TRADEMARKS
Turbo Pascal is a registered trademark of Borland International, Inc.
386MAX is a registered trademark of Qualitas, Inc.
NetRoom is a trademark of Helix Software Company, Inc.
Microsoft and MS-DOS are registered trademarks of Microsoft, Inc.
MATHLIB Documentation Page 1
DESCRIPTION
Three Turbo Pascal 6.0 units (TPU files) are provided with this software. Two
of these provide faster floating point calculation by directly accessing the
advanced instruction set of the '287 and '387 coprocessors. (These are not
accessible to math functions compiled under Turbo Pascal which is limited to
the 8087 instruction set.) The three units are MathLib (for use on any
machine, including those without a coprocessor), P287MathLib (for use only
with a '287 or better coprocessor) and P387MathLib (for use only with a '387
or better coprocessor). These units are in files MATHLIB.TPU, P287MATH.TPU,
and P387MATH.TPU, respectively. The units also contain a number of functions
which are not in the standard library. These functions are coded in Pascal in
MathLib and in assembly language in P287MathLib and P387MathLib. Units
P287MathLib and P387MathLib also contain assembly language replacements for
the intrinsic functions in the System Unit (i.e., ARCTAN, COS, EXP, LN, SIN).
These libraries are intended for users familiar with Turbo Pascal and the use
of units. Those not familiar with units should refer to the Turbo Pascal
manuals.
NOTES ON USAGE
1. Functions supported by all libraries (in alphabetical order):
NOTE: The instrinsic transcendental functions from the Turbo Pascal System
Unit (i.e., ARCTAN, COS, EXP, LN, SIN) can be of any type and are not
limited to type DOUBLE. That would be the case in UNIT MathLib.
FUNCTION ArcCOS(x: DOUBLE):DOUBLE; { arc cosine function }
FUNCTION ArcSIN(x: DOUBLE):DOUBLE; { arc sine function }
FUNCTION ARCTAN(x: DOUBLE):DOUBLE; { arc tangent function }
FUNCTION ArcTangent(x,y: DOUBLE):DOUBLE; { optional arc tan function }
{ returns arctan(y/x) in the proper quadrant, e.g., 0-360 degrees }
FUNCTION COS(x:DOUBLE):DOUBLE; { cosine function }
FUNCTION EXP(x:DOUBLE):DOUBLE; { exponential fn, e^x }
FUNCTION Expo(x,y:DOUBLE):DOUBLE; { exponential fn, x^y }
FUNCTION LN(x:DOUBLE):DOUBLE; { natural logarithm function }
FUNCTION LOG(x:DOUBLE):DOUBLE; { common logarithm function }
FUNCTION SIN(x:DOUBLE):DOUBLE; { sine function }
PROCEDURE SINCOS(x:DOUBLE; VAR y,z:DOUBLE); { sine/cosine procedure }
{ returns both sine and cosine; y = SIN(x), z = COS(x) }
FUNCTION TAN(x:DOUBLE):DOUBLE; { tangent function }
FUNCTION Ten2TheX(x:DOUBLE):DOUBLE; { exponential fn, 10^x }
FUNCTION Two2TheX(x:DOUBLE):DOUBLE; { exponential fn, 2^x }
MATHLIB Documentation Page 2
2. Libraries are valid only for type DOUBLE. (The author has found type
DOUBLE to be faster than type REAL.)
3. Libraries are compiled in Turbo Pascal 6.0 with the /v option. Object
code is compiled with TASM 2.01 in the IDEAL mode with the TPASCAL MODEL.
4. Standard USES convention; e.g., USES MathLib or USES P287MathLib or
USES P387MathLib. (Can't mix 'n' match libraries; use one or the other.)
5. Install the three TPU files in a directory where Turbo Pascal will find
them and use them in the normal way. E.g., can be USED in other units.
6. The advanced libraries (Px87MathLib) automatically supersede the intrinsic
math functions. No explicit action is required on the part of the user.
7. Hardware-specific software can be developed by changing a single line of
code and recompiling. E.g., USES MathLib ==> USES P387MathLib.
8. These libraries have been in use for about two years in mathematical
models of physical systems developed by the author. Speed increases of
up to 40% have been observed in computationally intensive programs.
9. Until you become familiar with these programs it would be prudent to
verify that they give the results you expect by comparing output from the
same program compiled with the basic and advanced units.
10. Registered users will receive a registration number and all Pascal source
code and assembled object code. The source and object codes will allow
compilation to past and future versions of Turbo Pascal without an
assembler. The registered version does not contain the initialization
shareware information screen. In addition, you will receive bonus
software for the Wichmann-Hill random number generator (Byte, March 1987)
in assembly and a solar/lunar ephemeris unit (both with source code).
11. Technical support is available on CompuServe at ID 72245,1337.
CUSTOM V